const express = require('express')
const router = express.Router()
const auth = require('@/middleware/auth.middleware')
const circleController = require('@/controllers/circle.controller')

/**
 * 友圈列表分页查询
 * @route GET /circle
 * @summary 友圈列表分页查询
 * @group 友圈管理
 * @param {string} pageNo.query.required
 * @param {string} pageSize.query.required
 * @param {string} searchKeywords.query 搜索关键字
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 * @access circle-manage-permission:btn:find
 * @security JWT
 */
router.get('/', auth(), circleController.findPage)

/**
 * 友圈删除
 * @route DELETE /circle
 * @summary 友圈删除
 * @group 友圈管理
 * @param {string} id.query.required
 * @returns {object} 200
 * @returns {Error}  default - Unexpected error
 * @access circle-manage-permission:btn:delete
 * @security JWT
 */
router.delete('/', auth(), circleController.deleteById)

module.exports = router
